#include <regx52.h>
#include <intrins.h>
#include "Lcd_Static.h"
#include "delay.h"


void Lcd_Init()
{
   PUSH=0;
   PULL=0;
}

void Lcd_Delay(unsigned char n)		//@11.0592MHz
{
	while(n)
	{
	unsigned char i, j;

	_nop_();
	_nop_();
	_nop_();
	i = 6;
	j = 90;
	do
	{
		while (--j);
	} while (--i);
	n--;
	}
}

void Lcd_Shine(unsigned char Lie,unsigned char a)
{
    _74HC595_(a);//段选
    P0=~(0x80>>Lie);//位选
    Lcd_Delay(1);
    P0=0xff;//清屏
}

void _74HC595_(unsigned char a)
{
    unsigned char i = 0;
    for(i=0;i<8;i++)
    {
        PUT = a&(0x80>>i);
        PULL = 1;
        PULL = 0;

    }
    
    PUSH = 1;
    PUSH= 0;

}